package com.achievo.know.domain;

import java.util.List;

import com.achievo.know.pojo.SearchResult;
import com.dayatang.domain.BaseEntityRepository;

public interface NewsRepository extends BaseEntityRepository<News, Long>{

	void batchDelete(String[] idArr);

	List<News> findNewsByArea(List<Long> cs, Long type,int limit);

	List<Object> search(String searchText, int currentPage,
			int pageSize);

	long searchCount(String searchText);

	int getMaxPosition();

	List<News> findPageNewsByArea(List<Long> cateIds, Long type, int currentPage, int pageSize);

	long countNewsByArea(List<Long> cateIds, Long type);

	long countByCate(String orderType, String resType, List<Long> cateIds);

	List<SearchResult> findPageNewsByCate(String orderType, String resType, List<Long> cateIds, int currentPage,
			int pageSize);

	Long getLid(Long areaId, Long id);

	Long getRid(Long areaId, Long id);

	Long getTop(Long areaId);

	Long getLid(Long id);

	Long getRid(Long id);

	Long getTop();

	void beforePosition(News onew, News nnew);

	boolean isAddFavorite(Long id, String username);

	void batchDeleteFavorite(String[] idArr);

}
